gsk/vulkan/image: Use UNDEFINED for initial layout
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 1 Apr 2023 18:33:10 +0000 (15:33 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 3 Apr 2023 13:59:45 +0000 (10:59 -0300)
commit724d07ef8a4a5150640acdc164d933487bbab9c5
treec6df3a3f727f194d06f1c70d9da24e6f53e563f2
parenta33ddd54ac8557bf49b204573c3088f748d3e61a
gsk/vulkan/image: Use UNDEFINED for initial layout

When creating an image using gsk_vulkan_image_new_for_framebuffer(),
it passes VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.

However, this is a mistake. The spec demands that the initial
layout must be either VK_IMAGE_LAYOUT_UNDEFINED or
VK_IMAGE_LAYOUT_PREINITIALIZED.

Apparently this was an oversight from commit b97fb751469, since the
commit message even documents that, and all other calls pass either
VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.

Create framebuffer images using VK_IMAGE_LAYOUT_UNDEFINED, which is
what was originally expected.
gsk/vulkan/gskvulkanimage.c